package com.hz.copyingsystem.service.impl;

import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hz.common.utils.PageUtils;
import com.hz.common.utils.Query;

import com.hz.copyingsystem.dao.CopyingSteleCalligraphyCharacterDao;
import com.hz.copyingsystem.entity.CopyingSteleCalligraphyCharacterEntity;
import com.hz.copyingsystem.service.CopyingSteleCalligraphyCharacterService;


@Service("copyingSteleCalligraphyCharacterService")
public class CopyingSteleCalligraphyCharacterServiceImpl extends ServiceImpl<CopyingSteleCalligraphyCharacterDao, CopyingSteleCalligraphyCharacterEntity> implements CopyingSteleCalligraphyCharacterService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<CopyingSteleCalligraphyCharacterEntity> page = this.page(
                new Query<CopyingSteleCalligraphyCharacterEntity>().getPage(params),
                new QueryWrapper<CopyingSteleCalligraphyCharacterEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<CopyingSteleCalligraphyCharacterEntity> getBySid(Long sid) {
        return this.baseMapper.selectList(new QueryWrapper<CopyingSteleCalligraphyCharacterEntity>().eq("sid",sid).orderByAsc("corder"));
    }

}